class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: F = 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.w: G = None
        self.z: G = None
        self.y: C = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: B = None
        self.u: C = None
        self.v: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: A = None
        self.s: C = None
        self.u: A = None
        self.z: G = None
        self.w: C = None
        self.txt = txt

f = A("f")
d = B("d")
g = C("g")
i = D("i")
l = E("l")
e = F("e")
a = G("a")
m = H("m")
j = C("j")

f.t = a
f.z = e
d.v = a
g.w = a
g.z = a
g.y = j
g.r = f
i.z = d
l.v = e
l.z = e
l.x = m
e.q = a
e.s = a
e.r = i
e.y = i
e.z = m
a.w = j
a.u = j
a.z = d
a.v = f
a.p = l
m.t = e
m.x = f
m.u = f
m.s = g
m.w = g
m.z = a
j.w = a
j.z = a
j.y = g
j.r = f
assert l.z.q.w.r.t.u.y.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.z: F = 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.w: G = None
        self.z: G = None
        self.y: C = None
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: F = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: B = None
        self.u: C = None
        self.v: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: A = None
        self.s: C = None
        self.u: A = None
        self.z: G = None
        self.w: C = None
        self.txt = txt

f = A("f")
d = B("d")
g = C("g")
i = D("i")
l = E("l")
e = F("e")
a = G("a")
m = H("m")
j = C("j")

f.t = a
f.z = e
d.v = a
g.w = a
g.z = a
g.y = j
g.r = f
i.z = d
l.v = e
l.z = e
l.x = m
e.q = a
e.s = a
e.r = i
e.y = i
e.z = m
a.w = j
a.u = j
a.z = d
a.v = f
a.p = l
m.t = e
m.x = f
m.u = f
m.s = g
m.w = g
m.z = a
j.w = a
j.z = a
j.y = g
j.r = f
assert l.z.q.w.r.t.u.y.z.v.txt == "f"