class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: F = None
        self.t: A = None
        self.v: E = None
        self.q: A = None
        self.x: A = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: H = None
        self.t: D = None
        self.q: H = None
        self.o: I = None
        self.u: F = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: I = None
        self.y: G = None
        self.r: B = None
        self.s: H = None
        self.t: C = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: I = None
        self.v: I = None
        self.t: F = None
        self.q: D = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: A = None
        self.y: G = None
        self.w: A = None
        self.v: A = None
        self.z: E = None
        self.q: I = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: G = None
        self.t: E = None
        self.y: A = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: E = None
        self.y: C = None
        self.p: D = None
        self.v: G = None
        self.txt = txt

b = A("b")
i = B("i")
f = C("f")
c = D("c")
l = E("l")
j = F("j")
e = G("e")
d = H("d")
g = I("g")

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: F = None
        self.t: A = None
        self.v: E = None
        self.q: A = None
        self.x: A = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: H = None
        self.t: D = None
        self.q: H = None
        self.o: I = None
        self.u: F = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: I = None
        self.y: G = None
        self.r: B = None
        self.s: H = None
        self.t: C = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: I = None
        self.v: I = None
        self.t: F = None
        self.q: D = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: A = None
        self.y: G = None
        self.w: A = None
        self.v: A = None
        self.z: E = None
        self.q: I = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: G = None
        self.t: E = None
        self.y: A = None
        self.r: E = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: E = None
        self.y: C = None
        self.p: D = None
        self.v: G = None
        self.txt = txt

b = A("b")
i = B("i")
f = C("f")
c = D("c")
l = E("l")
j = F("j")
e = G("e")
d = H("d")
g = I("g")

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