class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.v: C = None
        self.r: C = None
        self.o: E = None
        self.s: G = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: G = None
        self.s: C = None
        self.q: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: B = None
        self.o: C = None
        self.w: G = None
        self.q: F = None
        self.y: E = None
        self.r: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: B = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.y: B = None
        self.p: A = None
        self.q: E = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.u: A = None
        self.s: C = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

a = A("a")
b = B("b")
c = C("c")
d = D("d")
i = E("i")
j = F("j")
g = G("g")
n = C("n")
f = E("f")

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: G = None
        self.s: C = None
        self.q: F = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: B = None
        self.o: C = None
        self.w: G = None
        self.q: F = None
        self.y: E = None
        self.r: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: B = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: A = None
        self.y: B = None
        self.p: A = None
        self.q: E = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.u: A = None
        self.s: C = None
        self.p: A = None
        self.w: C = None
        self.txt = txt

a = A("a")
b = B("b")
c = C("c")
d = D("d")
i = E("i")
j = F("j")
g = G("g")
n = C("n")
f = E("f")

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