class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: A = None
        self.r: H = None
        self.w: C = None
        self.t: A = None
        self.z: H = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: G = None
        self.s: D = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: A = None
        self.r: H = None
        self.w: C = None
        self.t: A = None
        self.z: H = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: G = None
        self.s: D = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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