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

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

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

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.o: E = None
        self.y: E = None
        self.u: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: F = None
        self.o: E = None
        self.z: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.o: E = None
        self.y: E = None
        self.u: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: F = None
        self.o: E = None
        self.z: E = None
        self.p: E = None
        self.txt = txt

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

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

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