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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: A = None
        self.r: B = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.txt = txt

a = A("a")
l = B("l")
h = C("h")
g = D("g")
k = E("k")
j = F("j")
i = D("i")
c = C("c")
e = F("e")
f = C("f")

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: A = None
        self.r: B = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: F = None
        self.txt = txt

a = A("a")
l = B("l")
h = C("h")
g = D("g")
k = E("k")
j = F("j")
i = D("i")
c = C("c")
e = F("e")
f = C("f")

a.t = f
a.p = j
l.v = k
l.q = a
l.z = a
h.s = i
h.t = l
h.y = j
h.w = c
g.v = l
g.r = l
g.o = a
g.z = a
k.y = a
k.t = a
j.r = g
j.w = e
i.v = l
i.r = l
i.o = a
i.z = a
c.s = g
c.t = l
c.y = j
c.w = f
e.r = i
e.w = j
f.s = g
f.t = l
f.y = j
f.w = h
assert l.v.t.t.txt == "f"