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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: A = None
        self.z: A = None
        self.v: F = None
        self.u: D = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: A = None
        self.z: A = None
        self.v: F = None
        self.u: D = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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