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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: B = None
        self.y: G = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.p: F = None
        self.z: E = None
        self.u: F = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

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

h.x = i
h.t = d
h.p = j
d.y = i
b.t = a
b.z = h
b.v = e
b.r = i
a.q = b
a.u = b
a.z = d
a.y = j
a.v = j
e.z = k
e.w = h
e.r = i
e.t = a
e.y = a
i.u = d
j.y = e
j.z = e
j.q = h
j.p = i
j.u = i
j.w = i
j.o = b
k.x = i
k.t = d
k.p = j
assert d.y.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: B = None
        self.p: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: B = None
        self.y: G = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: A = None
        self.p: F = None
        self.z: E = None
        self.u: F = None
        self.o: C = None
        self.w: F = None
        self.txt = txt

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

h.x = i
h.t = d
h.p = j
d.y = i
b.t = a
b.z = h
b.v = e
b.r = i
a.q = b
a.u = b
a.z = d
a.y = j
a.v = j
e.z = k
e.w = h
e.r = i
e.t = a
e.y = a
i.u = d
j.y = e
j.z = e
j.q = h
j.p = i
j.u = i
j.w = i
j.o = b
k.x = i
k.t = d
k.p = j
assert d.y.u.y.txt == "i"