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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: F = None
        self.v: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: F = None
        self.v: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: A = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

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

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

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