class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.x: A = None
        self.r: E = None
        self.q: A = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: C = None
        self.p: G = None
        self.v: B = None
        self.z: B = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: C = None
        self.p: G = None
        self.v: B = None
        self.z: B = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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