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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: D = None
        self.v: D = None
        self.z: C = None
        self.p: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: D = None
        self.v: D = None
        self.z: C = None
        self.p: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.txt = txt

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

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