class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: F = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.x: E = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: E = None
        self.r: E = 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.x: F = None
        self.u: A = None
        self.p: D = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.o: D = None
        self.p: A = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: D = None
        self.x: E = None
        self.t: D = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: E = None
        self.r: E = 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.x: F = None
        self.u: A = None
        self.p: D = None
        self.s: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: A = None
        self.o: D = None
        self.p: A = None
        self.r: E = None
        self.txt = txt

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

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