class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

i = A("i")
d = B("d")
g = C("g")
h = D("h")
a = E("a")
m = F("m")
j = E("j")
e = B("e")
b = D("b")

i.x = b
d.u = m
d.s = e
g.u = b
g.z = b
h.s = e
h.t = b
a.y = h
a.s = h
m.r = g
m.w = g
m.v = b
m.t = a
j.y = h
j.s = b
e.u = m
e.s = d
b.s = e
b.t = h
assert d.u.t.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: D = None
        self.txt = txt

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

i = A("i")
d = B("d")
g = C("g")
h = D("h")
a = E("a")
m = F("m")
j = E("j")
e = B("e")
b = D("b")

i.x = b
d.u = m
d.s = e
g.u = b
g.z = b
h.s = e
h.t = b
a.y = h
a.s = h
m.r = g
m.w = g
m.v = b
m.t = a
j.y = h
j.s = b
e.u = m
e.s = d
b.s = e
b.t = h
assert d.u.t.s.s.txt == "e"