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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: F = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.w: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.z: B = None
        self.o: A = None
        self.p: C = None
        self.txt = txt

d = A("d")
h = B("h")
k = C("k")
f = D("f")
n = E("n")
j = F("j")
b = C("b")
g = D("g")
e = F("e")

d.v = n
h.p = k
h.x = e
h.s = f
k.t = b
k.x = f
k.w = d
f.v = b
n.p = b
j.s = h
j.z = h
j.x = f
j.o = d
j.p = k
b.t = k
b.x = f
b.w = d
g.v = k
e.s = h
e.z = h
e.x = f
e.o = d
e.p = k
assert e.o.v.p.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: F = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: D = None
        self.w: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: D = None
        self.z: B = None
        self.o: A = None
        self.p: C = None
        self.txt = txt

d = A("d")
h = B("h")
k = C("k")
f = D("f")
n = E("n")
j = F("j")
b = C("b")
g = D("g")
e = F("e")

d.v = n
h.p = k
h.x = e
h.s = f
k.t = b
k.x = f
k.w = d
f.v = b
n.p = b
j.s = h
j.z = h
j.x = f
j.o = d
j.p = k
b.t = k
b.x = f
b.w = d
g.v = k
e.s = h
e.z = h
e.x = f
e.o = d
e.p = k
assert e.o.v.p.t.t.txt == "b"