class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: C = None
        self.v: C = None
        self.p: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

g.t = i
g.r = i
g.v = i
g.p = a
g.q = n
f.u = g
f.w = g
f.q = i
f.p = i
f.v = a
i.v = g
i.p = c
i.q = a
a.v = j
j.v = i
j.z = c
j.s = g
j.t = a
l.p = a
l.q = g
l.u = i
l.s = i
c.u = g
c.w = g
c.q = i
c.p = i
c.v = a
n.u = g
n.w = g
n.q = i
n.p = i
n.v = a
m.v = i
m.z = c
m.s = g
m.t = a
assert g.r.p.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: C = None
        self.v: C = None
        self.p: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

g.t = i
g.r = i
g.v = i
g.p = a
g.q = n
f.u = g
f.w = g
f.q = i
f.p = i
f.v = a
i.v = g
i.p = c
i.q = a
a.v = j
j.v = i
j.z = c
j.s = g
j.t = a
l.p = a
l.q = g
l.u = i
l.s = i
c.u = g
c.w = g
c.q = i
c.p = i
c.v = a
n.u = g
n.w = g
n.q = i
n.p = i
n.v = a
m.v = i
m.z = c
m.s = g
m.t = a
assert g.r.p.v.v.txt == "j"