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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: I = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: C = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.o: C = None
        self.z: A = None
        self.s: C = None
        self.w: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: I = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: C = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: A = None
        self.o: C = None
        self.z: A = None
        self.s: C = None
        self.w: G = None
        self.txt = txt

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

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

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