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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: C = None
        self.t: A = None
        self.s: C = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: A = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: G = None
        self.u: E = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

i = A("i")
f = B("f")
k = C("k")
c = D("c")
m = E("m")
d = F("d")
g = G("g")
j = H("j")
h = A("h")
n = C("n")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: C = None
        self.t: A = None
        self.s: C = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: A = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: G = None
        self.u: E = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

i = A("i")
f = B("f")
k = C("k")
c = D("c")
m = E("m")
d = F("d")
g = G("g")
j = H("j")
h = A("h")
n = C("n")

i.w = j
f.x = m
k.x = m
k.v = n
k.s = n
k.t = h
k.y = j
c.q = g
c.s = h
c.p = j
m.u = d
d.o = h
d.z = g
d.u = m
d.t = i
d.v = k
g.x = m
g.t = d
j.y = d
h.w = j
n.x = m
n.v = k
n.s = k
n.t = i
n.y = j
assert m.u.z.x.u.t.txt == "i"