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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: F = None
        self.w: C = None
        self.txt = txt

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

a.v = g
a.r = g
k.y = d
k.w = h
k.t = a
h.y = m
g.w = a
g.v = k
d.p = h
d.o = h
d.w = g
d.x = g
d.q = k
c.o = e
c.y = e
c.w = h
j.o = c
j.y = c
j.w = h
e.o = c
e.y = c
e.w = h
m.y = d
m.w = h
m.t = a
assert c.w.y.t.v.v.w.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: F = None
        self.w: C = None
        self.txt = txt

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

a.v = g
a.r = g
k.y = d
k.w = h
k.t = a
h.y = m
g.w = a
g.v = k
d.p = h
d.o = h
d.w = g
d.x = g
d.q = k
c.o = e
c.y = e
c.w = h
j.o = c
j.y = c
j.w = h
e.o = c
e.y = c
e.w = h
m.y = d
m.w = h
m.t = a
assert c.w.y.t.v.v.w.y.y.txt == "d"