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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: D = None
        self.w: F = None
        self.q: D = None
        self.u: B = None
        self.txt = txt

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

g = A("g")
l = B("l")
f = C("f")
i = D("i")
k = E("k")
b = F("b")
h = C("h")
d = F("d")

g.u = h
g.t = l
g.z = k
g.s = b
l.z = d
l.v = i
f.p = h
i.v = l
k.t = l
k.u = l
k.z = i
k.q = i
k.w = b
b.t = k
b.w = k
b.z = d
h.p = f
d.t = k
d.w = k
d.z = b
assert b.w.u.z.w.t.z.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.z: E = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: D = None
        self.w: F = None
        self.q: D = None
        self.u: B = None
        self.txt = txt

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

g = A("g")
l = B("l")
f = C("f")
i = D("i")
k = E("k")
b = F("b")
h = C("h")
d = F("d")

g.u = h
g.t = l
g.z = k
g.s = b
l.z = d
l.v = i
f.p = h
i.v = l
k.t = l
k.u = l
k.z = i
k.q = i
k.w = b
b.t = k
b.w = k
b.z = d
h.p = f
d.t = k
d.w = k
d.z = b
assert b.w.u.z.w.t.z.w.w.txt == "b"