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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: B = None
        self.y: C = None
        self.x: A = None
        self.o: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: C = None
        self.u: D = None
        self.o: C = None
        self.p: F = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: D = None
        self.v: F = None
        self.w: F = None
        self.x: B = None
        self.u: D = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: B = None
        self.y: C = None
        self.x: A = None
        self.o: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: C = None
        self.u: D = None
        self.o: C = None
        self.p: F = None
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: D = None
        self.v: F = None
        self.w: F = None
        self.x: B = None
        self.u: D = None
        self.t: B = None
        self.txt = txt

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

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