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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: B = None
        self.u: E = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: B = None
        self.u: E = None
        self.p: D = None
        self.txt = txt

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

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

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