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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.u: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.t: H = None
        self.p: B = None
        self.v: F = None
        self.w: C = None
        self.q: H = None
        self.s: B = None
        self.x: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: E = None
        self.p: G = None
        self.t: D = None
        self.v: D = None
        self.u: D = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.u: G = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: A = None
        self.t: H = None
        self.p: B = None
        self.v: F = None
        self.w: C = None
        self.q: H = None
        self.s: B = None
        self.x: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: E = None
        self.p: G = None
        self.t: D = None
        self.v: D = None
        self.u: D = None
        self.o: F = None
        self.s: C = None
        self.txt = txt

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

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