class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: F = None
        self.t: B = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: A = None
        self.q: A = None
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

g = A("g")
i = B("i")
a = C("a")
n = D("n")
b = E("b")
k = F("k")
m = C("m")
j = D("j")
l = F("l")

g.x = i
g.t = i
g.v = l
g.p = l
i.r = b
i.o = b
i.y = g
i.q = g
i.z = k
a.t = g
a.s = g
a.u = m
a.v = n
a.o = l
n.x = b
n.s = b
n.t = i
b.s = g
b.y = l
b.t = l
b.w = i
b.p = m
b.x = k
k.o = a
k.u = a
k.q = l
k.v = l
m.t = g
m.s = g
m.u = a
m.v = n
m.o = l
j.x = b
j.s = b
j.t = i
l.o = m
l.q = k
l.v = k
l.u = a
assert b.w.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: F = None
        self.t: B = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: A = None
        self.q: A = None
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

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

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

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

g = A("g")
i = B("i")
a = C("a")
n = D("n")
b = E("b")
k = F("k")
m = C("m")
j = D("j")
l = F("l")

g.x = i
g.t = i
g.v = l
g.p = l
i.r = b
i.o = b
i.y = g
i.q = g
i.z = k
a.t = g
a.s = g
a.u = m
a.v = n
a.o = l
n.x = b
n.s = b
n.t = i
b.s = g
b.y = l
b.t = l
b.w = i
b.p = m
b.x = k
k.o = a
k.u = a
k.q = l
k.v = l
m.t = g
m.s = g
m.u = a
m.v = n
m.o = l
j.x = b
j.s = b
j.t = i
l.o = m
l.q = k
l.v = k
l.u = a
assert b.w.r.s.txt == "g"