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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.u: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: C = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

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

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

i.z = d
f.y = e
f.o = e
f.u = i
d.q = e
m.v = f
m.x = g
e.u = m
e.q = i
e.z = g
g.x = i
g.y = d
g.o = d
g.z = h
h.x = g
h.r = i
h.t = d
h.y = f
j.y = e
j.o = e
j.u = i
assert j.u.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.u: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: C = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

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

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

i.z = d
f.y = e
f.o = e
f.u = i
d.q = e
m.v = f
m.x = g
e.u = m
e.q = i
e.z = g
g.x = i
g.y = d
g.o = d
g.z = h
h.x = g
h.r = i
h.t = d
h.y = f
j.y = e
j.o = e
j.u = i
assert j.u.z.q.txt == "e"