class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: C = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: E = None
        self.x: H = None
        self.s: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: A = None
        self.q: F = None
        self.w: E = None
        self.r: E = None
        self.t: G = None
        self.s: C = None
        self.txt = txt

b = A("b")
e = B("e")
a = C("a")
m = D("m")
n = E("n")
c = F("c")
g = G("g")
k = H("k")
f = I("f")
j = H("j")

b.r = n
b.s = n
b.t = a
e.v = g
a.t = f
a.q = c
m.q = c
n.r = a
n.t = a
n.u = m
c.x = f
g.q = c
g.z = n
g.x = k
g.s = b
g.r = b
k.q = f
k.x = a
k.s = n
f.x = c
f.q = c
f.o = b
f.w = n
f.r = n
f.t = g
f.s = a
j.q = f
j.x = a
j.s = n
assert n.r.t.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: C = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: E = None
        self.x: H = None
        self.s: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: C = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: A = None
        self.q: F = None
        self.w: E = None
        self.r: E = None
        self.t: G = None
        self.s: C = None
        self.txt = txt

b = A("b")
e = B("e")
a = C("a")
m = D("m")
n = E("n")
c = F("c")
g = G("g")
k = H("k")
f = I("f")
j = H("j")

b.r = n
b.s = n
b.t = a
e.v = g
a.t = f
a.q = c
m.q = c
n.r = a
n.t = a
n.u = m
c.x = f
g.q = c
g.z = n
g.x = k
g.s = b
g.r = b
k.q = f
k.x = a
k.s = n
f.x = c
f.q = c
f.o = b
f.w = n
f.r = n
f.t = g
f.s = a
j.q = f
j.x = a
j.s = n
assert n.r.t.o.txt == "b"