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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: G = None
        self.v: A = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: C = None
        self.z: B = None
        self.v: B = None
        self.y: G = None
        self.r: D = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: G = None
        self.v: A = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: C = None
        self.z: B = None
        self.v: B = None
        self.y: G = None
        self.r: D = None
        self.o: A = None
        self.txt = txt

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

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