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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.x: G = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.t: D = None
        self.p: A = None
        self.q: D = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: D = None
        self.x: G = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: C = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.t: D = None
        self.p: A = None
        self.q: D = None
        self.z: D = None
        self.txt = txt

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

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