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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.w: E = None
        self.y: B = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.s: G = None
        self.w: B = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

f = A("f")
n = B("n")
m = C("m")
l = D("l")
h = E("h")
b = F("b")
k = G("k")
e = C("e")
d = G("d")

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: B = None
        self.w: E = None
        self.y: B = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.s: G = None
        self.w: B = None
        self.r: A = None
        self.z: E = None
        self.txt = txt

f = A("f")
n = B("n")
m = C("m")
l = D("l")
h = E("h")
b = F("b")
k = G("k")
e = C("e")
d = G("d")

f.v = h
n.r = h
n.x = e
n.q = l
n.w = l
n.z = b
m.q = h
m.w = h
m.s = h
m.v = n
m.y = n
l.x = h
l.t = h
l.r = f
h.r = b
h.p = b
b.o = n
b.s = n
b.w = l
b.q = l
b.p = h
b.x = k
b.r = e
k.v = b
k.q = l
k.s = d
k.w = n
k.r = f
k.z = h
e.q = h
e.w = h
e.s = h
e.v = n
e.y = n
d.v = b
d.q = l
d.s = k
d.w = n
d.r = f
d.z = h
assert e.s.p.r.v.x.y.r.p.txt == "b"