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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: B = None
        self.q: E = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

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

e = A("e")
n = B("n")
g = C("g")
l = D("l")
b = E("b")
f = F("f")
c = B("c")
i = C("i")
a = F("a")
h = E("h")

e.p = c
e.v = l
e.o = g
e.y = a
n.v = l
n.y = f
n.x = i
g.y = l
g.r = a
l.y = f
l.t = h
b.x = h
b.q = h
b.r = n
b.y = c
b.z = c
f.q = i
f.u = g
f.z = c
f.w = l
f.r = n
f.x = e
c.v = l
c.y = a
c.x = g
i.y = l
i.r = a
a.q = i
a.u = g
a.z = n
a.w = l
a.r = c
a.x = e
h.x = b
h.q = b
h.r = c
h.y = c
h.z = c
assert f.w.t.r.y.u.y.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: D = None
        self.o: C = None
        self.y: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: B = None
        self.q: E = None
        self.y: B = None
        self.z: B = None
        self.txt = txt

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

e = A("e")
n = B("n")
g = C("g")
l = D("l")
b = E("b")
f = F("f")
c = B("c")
i = C("i")
a = F("a")
h = E("h")

e.p = c
e.v = l
e.o = g
e.y = a
n.v = l
n.y = f
n.x = i
g.y = l
g.r = a
l.y = f
l.t = h
b.x = h
b.q = h
b.r = n
b.y = c
b.z = c
f.q = i
f.u = g
f.z = c
f.w = l
f.r = n
f.x = e
c.v = l
c.y = a
c.x = g
i.y = l
i.r = a
a.q = i
a.u = g
a.z = n
a.w = l
a.r = c
a.x = e
h.x = b
h.q = b
h.r = c
h.y = c
h.z = c
assert f.w.t.r.y.u.y.t.x.txt == "b"