class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.z: H = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: B = None
        self.r: H = None
        self.p: D = None
        self.y: B = None
        self.s: C = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: G = None
        self.r: H = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: G = None
        self.z: H = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: B = None
        self.r: H = None
        self.p: D = None
        self.y: B = None
        self.s: C = None
        self.v: A = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: G = None
        self.r: H = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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