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

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

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

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: E = None
        self.t: F = None
        self.r: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: E = None
        self.t: F = None
        self.r: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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