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

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

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

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

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

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

m = A("m")
c = B("c")
f = C("f")
h = D("h")
i = E("i")
d = F("d")
a = B("a")
k = F("k")
l = A("l")

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

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

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

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

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

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

m = A("m")
c = B("c")
f = C("f")
h = D("h")
i = E("i")
d = F("d")
a = B("a")
k = F("k")
l = A("l")

m.y = a
m.w = l
m.u = d
m.t = d
m.s = f
c.x = i
c.w = i
c.q = h
f.v = c
f.r = k
h.z = k
h.x = i
i.u = h
i.w = k
i.y = d
d.x = k
d.w = a
d.r = f
d.s = h
d.o = i
d.y = l
a.x = i
a.w = i
a.q = h
k.x = d
k.w = c
k.r = f
k.s = h
k.o = i
k.y = m
l.y = c
l.w = m
l.u = d
l.s = f
l.t = k
assert f.v.x.w.r.v.x.y.r.v.txt == "c"