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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

g = A("g")
l = B("l")
i = C("i")
f = D("f")
c = E("c")
e = F("e")
b = G("b")
j = G("j")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

g = A("g")
l = B("l")
i = C("i")
f = D("f")
c = E("c")
e = F("e")
b = G("b")
j = G("j")

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