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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: D = None
        self.s: C = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: A = None
        self.v: C = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

b = A("b")
j = B("j")
d = C("d")
c = D("c")
l = E("l")
i = F("i")
k = G("k")
e = C("e")
m = D("m")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: D = None
        self.s: C = None
        self.v: C = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: A = None
        self.v: C = None
        self.u: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

b = A("b")
j = B("j")
d = C("d")
c = D("c")
l = E("l")
i = F("i")
k = G("k")
e = C("e")
m = D("m")

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