class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: B = None
        self.u: G = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: E = None
        self.r: E = None
        self.z: H = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: B = None
        self.v: F = None
        self.p: C = None
        self.y: H = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.u: G = None
        self.y: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: I = None
        self.y: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: D = None
        self.t: A = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: G = None
        self.x: H = None
        self.q: B = None
        self.y: E = None
        self.s: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: E = None
        self.r: E = None
        self.z: H = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: B = None
        self.v: F = None
        self.p: C = None
        self.y: H = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = None
        self.u: G = None
        self.y: G = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: I = None
        self.y: I = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: D = None
        self.t: A = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: G = None
        self.x: H = None
        self.q: B = None
        self.y: E = None
        self.s: B = None
        self.txt = txt

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

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